<template>
  <div>
    <ul>
      <li v-for="obj in arr" :key="obj.id">
        {{ obj.name }}

        <input type="text" />
      </li>
    </ul>
    <button @click="btn">下标1位置插入新来的</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: [
        {
          name: "老大",
          id: 50,
        },
        {
          name: "老二",
          id: 31,
        },
        {
          name: "老三",
          id: 10,
        },
      ],
    };
  },
  methods: {
    btn() {
      // splice 方法实现插入数据
      this.arr.splice(1, 0, "新来的");
    },
  },
};
</script>

<style>
</style>
